package com.koron.operation.classes.shift.service;

import com.github.pagehelper.PageInfo;
import com.koron.bean.query.PageQuery;
import com.koron.operation.classes.schedule.bean.dto.StaffShiftInfo;
import com.koron.operation.classes.schedule.bean.query.ScheduleQuery;
import com.koron.operation.classes.schedule.bean.query.ShiftStaffQuery;
import com.koron.operation.classes.schedule.bean.vo.ClassesStaffVO;
import com.koron.operation.classes.shift.bean.dto.AdjustRecordDTO;
import com.koron.operation.classes.shift.bean.dto.ChangeShiftDTO;
import com.koron.operation.classes.shift.bean.dto.MonthClassDTO;
import com.koron.operation.classes.shift.bean.dto.ShiftRecordDTO;
import com.koron.operation.classes.shift.bean.param.ClassesAdjustParam;
import com.koron.operation.classes.shift.bean.po.ClassesTip;
import com.koron.operation.classes.shift.bean.query.ShiftQuery;
import com.koron.operation.classes.shift.bean.query.ShiftRecordQuery;
import com.koron.operation.classes.shift.bean.vo.ShiftRecordExportVO;
import com.koron.operation.classes.shift.bean.vo.ShiftRecordVO;
import org.koron.ebs.mybatis.SessionFactory;

import java.util.List;
import java.util.Map;

/**
 * @author jzp
 * @since 2021/10/27
 */
public interface ShiftService {
    ChangeShiftDTO getChangeShift(SessionFactory factory, ShiftRecordQuery query);

    List<ShiftRecordExportVO> exportList(SessionFactory factory, ShiftRecordQuery query);

    PageInfo<ShiftRecordVO> page(SessionFactory factory, PageQuery pageQuery, ShiftRecordQuery query);

    ShiftRecordDTO detail(SessionFactory factory, ShiftQuery query);

    AdjustRecordDTO adjustRecord(SessionFactory factory, String thisShiftId, String nextShiftId);

    List<ClassesTip> getTipByCondition(SessionFactory factory, String deptId, String locationId, String staffType);

    List<ClassesStaffVO> staffs(SessionFactory factory, String deptId, String locationId);

    Map<String, List<ClassesStaffVO>> home(SessionFactory factory, String deptId);

    List<Map<String, Object>> leader(SessionFactory factory);

    StaffShiftInfo staffShift(SessionFactory factory, ShiftStaffQuery query);

    void adjustStaff(SessionFactory factory, ClassesAdjustParam classesAdjustParam);

    boolean saveOrUpdate(SessionFactory factory, ShiftRecordDTO shiftRecordDTO);

    boolean handover(SessionFactory factory, ShiftRecordDTO shiftRecordDTO);

    boolean takeover(SessionFactory factory, String recordId);

    boolean straightTakeover(SessionFactory factory, String thisShiftId, String nextShiftId);

    boolean reject(SessionFactory factory, String recordId);

    String printShift(SessionFactory factory, ShiftQuery query);

    List<MonthClassDTO> getMonthClass(SessionFactory factory, ScheduleQuery scheduleQuery);

}
